Skip to content

Studio: a background run on a Claude Code version the sandbox gate has not passed on warns (#774) - #796

Merged
danielrispler merged 3 commits into
mainfrom
issue-774-studio-a-background-run
Nov 28, 2026
Merged

danielrispler merged 3 commits into
mainfrom
issue-774-studio-a-background-run

Conversation

@danielrispler

@danielrispler danielrispler commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Closes #774.

Summary

A background run on a Claude Code version the sandbox gate has not passed on still starts, and its row says so.

 Runner::submit(request)
   harness.command(plan)
+  harness.warning(command)            # Claude: gate_warning(program)
+    `<claude> --version`, 10 s        # before the runner's lock
+    == GATED_CLAUDE_CODE ("2.1.326")  -> none
+    other version                     -> "The sandbox gate has not run on Claude Code <v> (last passed on 2.1.326)."
+    no version read                   -> "The sandbox gate has not run on an unknown version of Claude Code (last passed on 2.1.326)."
   write run.json                      # + warning (optional: old and new builds read each other's)
   queue, start
 Runner::runs -> RunView
+  warning: stored.warning             # every state, and after a restart
 <div class="run-row">                 (ui/map-runs.ts, rowNode)
   <span class="run-title">
   <span class="run-note">
+  <p class="run-warning">             # queued, running and ended; plain text, never live
   <ul class="run-denials">
  • GATED_CLAUDE_CODE is 2.1.326: Studio: a background run whose tools would get the shared temp folder fails closed #773's gate run, whose summary.md records claude --version: 2.1.326 (local-evidence/2026-11-28-issue-773-sandbox-gate/). The installed Claude Code is 2.1.326 too, so the gate was not rerun.
  • docs/studio/behaviour/background-runs.md, "The gated version": how a passing rerun updates the constant, and both texts of the warning.
  • The unknown-version text reads "on an unknown version of Claude Code": the ticket's sentence with "an unknown version" put in literally reads "on Claude Code an unknown version".
  • Outside the ticket's Touches: ui/style.css (the warning spans the row's grid), and scripts/snap/fixtures-runs.ts (mapRuns gives its running run a warning and checks it is drawn under the note).

Evidence

  • a_claude_code_version_the_sandbox_gate_has_not_passed_on_warns (server/tests/runner.rs), a fake claude --version per row:
    Before: red, left: None, right: Some("The sandbox gate has not run on Claude Code 2.1.399 (last passed on 2.1.326).")
    After: green for gated → none; other → the version's warning; exit 1, garbled, missing → unknown version.
  • a_run_on_an_ungated_claude_code_starts_and_warns_while_queued_running_ended_and_after_a_restart:
    Before: red, left: [(…, Running, None), (…, Queued, None)]
    After: green: the warning on both runs while running and queued, again after plotkeeper starts again with a harness that warns of nothing, and once both ended; the warned run ran.
  • Wire: runs() in server/tests/wire.rs gains a queued and an ended run with a warning; tsc -p scripts/wire was red ('"warning"' does not exist in type 'RunView'), then green with ui/types.ts.
  • UI: the new test in ui/tests/map-runs.test.mjs paints the runs queued, running and ended, each twice: the warning is drawn right after the note every time, and not on a run without one. Red before rowNode drew it, then green. npm run snap -- mapRuns prints runs ok.

npm run check

Passes after merging main (707a1a5): nextest 1960 of 1960, npm run test:node 834. Before that merge, 3 tests failed on main too (read_loop::the_replay_sends_the_list_once_and_a_live_line_sends_it_again and two in web.rs): their log's times had passed the prune's 30-day window, which #792 fixed with a fixed clock.

back_a_law::dismiss_waits_until_the_proof_is_done_with_the_runs_folder failed once (plotkeeper is still checking what this run made) on code this diff does not touch, and passed on its one rerun.

CI's first ubuntu run failed hook/tests/harness_trees.rs's opencode case (left: "", right: "hello.txt"), on code this diff does not touch; it passes locally and on main's CI, and the push of the merge is its one rerun.

Review

Correctness pass (a reviewer told to trace state, ordering and concurrency, run the tests and read stored data both ways): no bugs. run.json with warning reads in main's Stored and Launched (no deny_unknown_fields); one without it reads as none here. The version read happens before the runner's lock. Noted and left: MicroWorlds::explore and finish hold the micro-worlds store lock around submit, so a hanging --version would add up to 10 s to it, as fill's git archive already does under that lock.

Standards review: fixed in e96042d: submit's doc comment names the version read; the test harness's warning no longer hard-codes 2.1.326; .run-warning takes its size from the shared rule.

Outside review

  • Model: gemini-4-neon-medium (run because Stored, a type that derives Deserialize, changed).
  • cost: 2.0 min, 195664 tokens; Gemini quota left: weekly 53% to 52%, 5h 96% to 93%
  • Findings: none.

Merge Danger

Door: two-way

run.json gains an optional field that older builds ignore; a revert leaves nothing to migrate.

Blast Radius: small

Every claude run's submit now starts claude --version once (0.02 s here, 10 s at most). A run never fails or is refused on it.

🤖 Generated with Claude Code

danielrispler and others added 3 commits November 28, 2026 12:48
…s not passed on warns (#774)

The gated version is a constant beside the sandbox block, GATED_CLAUDE_CODE = 2.1.326 (#773's gate run).
A submit reads `claude --version` through Harness::warning; any other version, or one that does not
read, gives the run a warning and the run starts as normal. The warning is kept in run.json, so it
outlives a restart, and reaches the map as RunView.warning, drawn under the row's note in every state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… test's warning is any text, one size rule

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@danielrispler
danielrispler merged commit 6dea539 into main Nov 28, 2026
4 checks passed
@danielrispler
danielrispler deleted the issue-774-studio-a-background-run branch November 28, 2026 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Studio: a background run on a Claude Code version the sandbox gate has not passed on warns

1 participant